﻿using System.Collections.Generic;
using UnityEngine;

namespace ZXthex
{
    abstract class FillHoleHelper
    {
        protected Vector3 normal { get; private set; }
        protected List<Vector3> points { get; }
        public FillHoleHelper()
        {
            points = new List<Vector3>();
        }

        public virtual void Init(Vector3 planeNormalInObject)
        {
            points.Clear();
            normal = planeNormalInObject;
        }

        public virtual void AddPoint(Vector3 pointInObject)
        {
            if (!points.Contains(pointInObject))
                points.Add(pointInObject);

        }

        public abstract Mesh[] GetMeshes(bool needUV = false);

    }
}